<?php
/**
 * @brief Class for SQL SELECT fragments.
 * @note 参考自ZendFramework的Zend_Db_Expr类
 */
class Db_Expr {
    /**
     * Storage for the SQL expression.
     *
     * @var string
     */
    protected $_expression;

    /**
     * Instantiate an expression, which is just a string stored as
     * an instance member variable.
     *
     * @param string $expression The string containing a SQL expression.
     */
    public function __construct($expression) {
        $this->_expression = (string) $expression;
    }

    /**
     * @return string The string of the SQL expression stored in this object.
     */
    public function __toString() {
        return $this->_expression;
    }
}
